package com.ymatou.iapi.productsnapshot.service;

import com.ymatou.iapi.productsnapshot.parameter.SnapshotOriginList;
import com.ymt.base.YmatouBaseCall;
import com.ymt.core.tool.FormatUtil;
import com.ymttest.utils.EnvSetup;
/**
*获取商品产地信息快照列表Call
*FreeMaker Template自动生成代码
*/
public class GetProductSnapshotOriginListCall extends YmatouBaseCall{
	private static String opurl ="/api/Product/GetProductSnapshotOriginList";
	
	public GetProductSnapshotOriginListCall() {
		super(EnvSetup.getSystemUrl("productsnapshot"),opurl,"POST","JSON");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	 public SnapshotOriginList getSnapshotOriginList()
	    {
	    	SnapshotOriginList data = null;
	        try {
	            data = (SnapshotOriginList) FormatUtil.GSONToObject(getString("Data"), SnapshotOriginList.class);

	        } catch (Exception e) {
	            e.printStackTrace();
	        }
	        return data;
	    }
}